/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.teaching.entity;

import org.hibernate.validator.constraints.Length;

import com.thinkgem.jeesite.common.persistence.DataEntity;

/**
 * 题目管理Entity
 * @author 王卫党
 * @version 2018-01-28
 */
public class Answer extends DataEntity<Answer> {
	
	private static final long serialVersionUID = 1L;
	private String subOption;		// 选项
	private String content;		// 选项内容
	private String correct;		// 是否正确，也就是是否为标准答案
	private String questionId;		// 问题编号，对应bay_question.id 父类
	
	public Answer() {
		super();
	}

	public Answer(String id){
		super(id);
	}

	public Answer(Question question){
		this.questionId = question.getId();
	}

	@Length(min=1, max=1, message="选项长度必须介于 1 和 1 之间")
	public String getSubOption() {
		return subOption;
	}

	public void setSubOption(String subOption) {
		this.subOption = subOption;
	}
	
	@Length(min=1, max=500, message="选项内容长度必须介于 1 和 500 之间")
	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}
	
	@Length(min=1, max=1, message="是否正确，也就是是否为标准答案长度必须介于 1 和 1 之间")
	public String getCorrect() {
		return correct;
	}

	public void setCorrect(String correct) {
		this.correct = correct;
	}
	
	@Length(min=1, max=6, message="id长度必须介于 1 和 6 之间")
	public String getQuestionId() {
		return questionId;
	}

	public void setQuestionId(String questionId) {
		this.questionId = questionId;
	}
	
}